The present invention relates to a method digital cameras and more particularly to a method and system for providing DMA transfers which support image rotation in a digital camera.
Conventional digital cameras capture an image using a charge-coupled device (CCD) array. The raw data in the CCD array may be transferred to a buffer or other component in the digital camera. Such transfers of data, particularly direct memory access (xe2x80x9cDMAxe2x80x9d) transfers of data, typically start at a particular pixel in the CCD array. The DMA takes this base pixel, transfers each pixel in the line, and repeats the process for the remaining lines of pixels in the CCD array.
Similarly, when transferring data from a buffer to another component, DMA typically begins with a base address and transfers a number of sequential addresses. The first data transferred typically corresponds to the base pixel of the CCD array. Once the data is transferred from the buffer, color conversion and compression is performed. The image is then stored in memory or provided to the user, typically on a liquid-crystal display (LCD) screen.
In order to perform image processing, color interpolation is also performed. Each pixel in a CCD array is typically sensitive to only one color of light. However, the image is usually made up of at least three colors, for example red, green, and blue. To supply data on the colors not captured by a particular pixel, color interpolation on data from surrounding pixels is typically performed during image processing.
The images captured by such conventional digital cameras could be either portrait or landscape images. Portrait images are those images having a height greater than the width. Landscape images typically have a width greater than height. A user typically captures a landscape image by keeping the digital camera in a standard upright orientation. A portrait image is captured by rotating the camera either right or left prior to capturing the image.
Although conventional digital cameras are capable of capturing both landscape and portrait images, conventional transfers of data are insensitive to rotation of the image. For example, DMA transfers of data begin at the same point in the buffer storing the raw image data irrespective of whether the image is a portrait or a landscape image. Similarly, the image data is processed without regard to the orientation of the digital camera during image capture. Therefore, when the image is displayed on the LCD screen, the orientation of the image is the same as when the image was captured. Consequently, in order to view a portrait image in the proper orientation, a user must either rotate the digital camera or manually rotate the image to the right or the left. Even where the user can manually rotate the image, multiple frame buffers are typically required.
Accordingly, what is needed is a system and method for providing data transfers which allow automatic image rotation. It would also be beneficial if the system and method consumed a small amount of the digital camera""s resources, such as bus bandwidth. Finally, it would be desirable if the system was capable of being implemented using a single frame buffer. The present invention addresses such a need.
The present invention provides a method and system for providing data transfers which support image rotation. In one aspect, the method and system comprise determining the orientation of the image capture device and transferring the data from a memory in an order. The order depends on the orientation of the image capture device. In a second aspect, the method and system comprise determining the orientation of the image capture device and defining an image area of the image sensor based on the orientation of the image capture device. In a third aspect, the method and system comprise transferring data in a plurality of computational units and processing each computational unit of the plurality of computational units of data. At least a portion of a computational unit is processed while at least a portion of a subsequent computational unit is transferred.
According to the system and method disclosed herein, the present invention provides a method and system for transferring data which supports image rotation, thereby increasing overall system performance.